//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    multiArray: [['科目1', '科目4'], ['c1', 'c2', 'a1', 'a2', 'b1','b2']],
    datalib: "",
  },

  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },

  bindMultiPickerChange:function(e){
    let chooseSubject;
    let chooseModel;

    if(e.detail.value[0] == 0)
    {
        chooseSubject = 1
    }
    else{
        chooseSubject = 4
    }
    switch(e.detail.value[1])
    {
      case 0:
        chooseModel = 'c1'
        break;
      case 1:
        chooseModel = 'c2'
        break;
      case 2:
        chooseModel = 'a1'
        break;
      case 3:
        chooseModel = 'a2'
        break;
      case 4:
        chooseModel = 'b1'
        break;
      case 5:
        chooseModel = 'b2'
        break;
    }
    console.log(chooseSubject + chooseModel)

    wx.navigateTo({
      url: '/pages/test/test?subject=' + chooseSubject + '&model=' + chooseModel

    })   
    console.log(this.data.datalib)

  },
  bindMultiPickerChange2: function (e) {
    let chooseSubject;
    let chooseModel;

    if (e.detail.value[0] == 0) {
      chooseSubject = 1
    }
    else {
      chooseSubject = 4
    }
    switch (e.detail.value[1]) {
      case 0:
        chooseModel = 'c1'
        break;
      case 1:
        chooseModel = 'c2'
        break;
      case 2:
        chooseModel = 'a1'
        break;
      case 3:
        chooseModel = 'a2'
        break;
      case 4:
        chooseModel = 'b1'
        break;
      case 5:
        chooseModel = 'b2'
        break;
    }
    console.log(chooseSubject + chooseModel)

    wx.navigateTo({
      url: '/pages/examination/examination?subject=' + chooseSubject + '&model=' + chooseModel

    })
    console.log(this.data.datalib)

  },
  onLoad: function () {
  },
  bindMultiPickerChange3: function (e) {
    let chooseSubject;
    let chooseModel;

    if (e.detail.value[0] == 0) {
      chooseSubject = 1
    }
    else {
      chooseSubject = 4
    }
    switch (e.detail.value[1]) {
      case 0:
        chooseModel = 'c1'
        break;
      case 1:
        chooseModel = 'c2'
        break;
      case 2:
        chooseModel = 'a1'
        break;
      case 3:
        chooseModel = 'a2'
        break;
      case 4:
        chooseModel = 'b1'
        break;
      case 5:
        chooseModel = 'b2'
        break;
    }
    console.log(chooseSubject + chooseModel)

    wx.navigateTo({
      url: '/pages/randtest/randtest?subject=' + chooseSubject + '&model=' + chooseModel

    })
    console.log(this.data.datalib)

  },
})
